<template>
  <div class="dialog-wrapper"
       :class="{'open':is_open}">
    <div class="overlay" @click="close"></div>
    <div class="dialog">
      <div class="heading">
        <slot name="heading"></slot>
      </div>
      <slot></slot>
    </div>
  </div>
</template>

<script>
import './dialog.less'

export default {
  name: 'Dialog',
  data () {
    return {
      is_open: false
    }
  },
  methods: {
    open () {
      this.is_open = true
    },
    close () {
      this.is_open = false
    }
  }
}
</script>

<style scoped>

</style>
